package com.adams.dcxt.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.adams.dcxt.bean.OrderDishes;
import com.adams.dcxt.core.Page;
import com.adams.dcxt.dao.OrderDishesDao;

@Service("orderDishesService")
@Transactional
public class OrderDishesServiceImpl  implements  OrderDishesService {
    
    @Autowired
    private  OrderDishesDao orderDishesDao;
    @Override
    public Page<OrderDishes>  getListByOrderId(Long orderId ,Page<OrderDishes> page) {
        String hql  =" from OrderDishes where orderId = ?" ;
        return orderDishesDao.queryPage(page, hql, orderId);
    }
    @Override
    public void save(OrderDishes odishes) {
        orderDishesDao.save(odishes);
    }

}
